<template>
  <el-form inline class="u-block m-search" :model="param">
    <el-form-item label="组织">
      <org-select-vertical-lazy v-model="param.org" :label.sync="param.orgName" clearable/>
    </el-form-item>
    <el-form-item label="名称">
      <el-input v-model="param.name" />
    </el-form-item>
    <el-form-item>
      <el-button type="primary" @click="search">搜索</el-button>
      <el-button @click="reset">重置</el-button>
    </el-form-item>
  </el-form>
</template>

<script>
class ParamModel {
  constructor () {
    return {
      org: '',
      orgName: '',
      name: ''
    }
  }
}
export default {
  name: 'HomeView',
  components: {},
  data () {
    return {
      param: new ParamModel()
    }
  },
  methods: {
    search () {
      this.$message.success(JSON.stringify(this.param))
    },
    reset () {
      this.param = new ParamModel()
    }
  }
}
</script>

<style lang="scss" scoped>
.m-search {
  padding-bottom: 0;
  .el-form-item {
  }
}
</style>
